Skip to content

クロールしても無駄なパスと AI のクローラーを robots.txt で止める - #593

Merged
takayamaki merged 1 commit into
imastodonfrom
fix/robots-txt-crawlers
Oct 26, 2026
Merged

takayamaki merged 1 commit into
imastodonfrom
fix/robots-txt-crawlers

Conversation

@takayamaki

Copy link
Copy Markdown
Member

ExaSearchBot と meta-externalagent を GPTBot と同じく全部止め、ほかのクローラーには /auth/・/users/・/api/v1/timelines/・/api/v1/trends/ を止める。

2026-10-26 の ALB のログでは、meta-externalagent が /auth/sign_up を 1 時間に 7,000 件取りに来ていて、ALB の転送量の 3 分の 1 を占めていた。
許可リストにしなかった理由はコミットメッセージにある。

本番に効かせる imastodon-v4.7 向けと、次の版へ持ち越す imastodon 向けの 2 本を出している。

🤖 Generated with Claude Code

https://claude.ai/code/session_01SWbPafc6c8z6wxBdvafPqc

ExaSearchBot と meta-externalagent は GPTBot と同じく、AI 用のクローラーなので全部止める。
どちらも robots.txt に従うと公言している。

それ以外は、クロールしても意味の無いパスだけを名指しで止める。
クロールしてよいパスだけを許す書き方は退けた。
cdn.imastodon.net も imastodon.net の robots.txt をそのまま返すので、/packs やメディアまで漏れなく並べないと検索エンジンの描画やリンクカードが壊れる。
upstream がパスを足したときも、検索に載るべきページが黙って止まる。

/api/ を丸ごと止めないのは、検索エンジンが画面を描くのに /api/v1/custom_emojis などを取りに来ているため。
/api/v1/timelines/ を止めると /public/local は空に見えるが、中身が分刻みで変わるページで、投稿は /@user/<id> で載るので困らない。

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SWbPafc6c8z6wxBdvafPqc
@takayamaki
takayamaki enabled auto-merge October 26, 2026 23:29
@takayamaki
takayamaki merged commit 9838aea into imastodon Oct 26, 2026
10 checks passed
@takayamaki
takayamaki deleted the fix/robots-txt-crawlers branch October 26, 2026 23:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant